﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebSite.Master" AutoEventWireup="true"
    CodeBehind="PersonChangeCorpList.aspx.cs" Inherits="RN.ERP.Web.PersonChange.PersonChangeCorpList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" />
    <script type="text/javascript" src="../Scripts/ligerUI/js/ligerui.all.js"></script>
    <style type="text/css">
        .Changebtn
        {
            width: 68px;
            height: 25px;
            color: #fff;
            line-height: 22px;
            text-decoration: none;
            display: block;
            background: url(../images/xtbiao.jpg) left top no-repeat;
            color: #fff;
            text-align: center;
            cursor: pointer;
        }
    </style>
        <script type="text/javascript">
            function CheckSel() {
                var chk = $("input:checked");
                if (chk.length == 0) {
                    $.ligerDialog.warn("请选择要操作的项！");
                    return false;
                }
                return true;
            }
            function GetCheckVal() {
                var empGuid = "";
                $("input:checked").each(function () {
                    empGuid += "," + $(this).val();
                });
                if (empGuid.length > 1) {
                    empGuid = empGuid.substring(1);
                }
                return empGuid;
            }

            /*查看人员*/
            function CheckView() {
                if (!CheckEdit()) {
                    return false;
                }
                var empGuid = GetCheckVal();
                ShowViewForm(empGuid, 1);
            }
            /*变更人员*/
            function ChangeView() {
                if (!CheckSel()) {
                    return false;
                }
                var chk = $("input:checked");
                if (chk.length > 1) {
                    $.ligerDialog.warn("只能选择一项！");
                    return false;
                }
            }
            /*刷新*/
            function refreshGrid() {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("ChangeRebind");
            }
            function OpenAlert(text) {
                $.ligerDialog.warn(text);
                return false;
            }
            /*打开窗口*/
            function ShowViewForm(empGuid1) {
                top.ChildDialog = top.$.ligerDialog.open({ url: "Person/PersonEmpView.aspx?empGuid=" + empGuid1 + "&opt=2", width: 1080, height: 800, title: '', buttons: [{ text: '关闭', onclick: function (item, dialog) { dialog.close(); } }] });
                return false;
            }
            ///人员变更
            function ChangePerson(ChangeSetId, ObjectId, ObjectName, corpName) {
                top.ChildDialog = top.$.ligerDialog.open({ url: "PersonChange/PersonChangeInfo.aspx?changeSetId=" + ChangeSetId + "&objectId=" + ObjectId + "&objectType=7&objectName=" + escape(ObjectName) + "&corpName=" + escape(corpName), width: 920, height: 620, title: '变更明细', buttons: [{ text: '关闭', onclick: function (item, dialog) { RefreshToList(); dialog.close(); } }] });
                top.ChildDialogWin = this;
                return false;
            }
            /*操作刷新列表*/
            function ChangeOnClientClose(oArg) {
                if (oArg.Result == 1) {
                    refreshGrid();
                }
            }
            function RefreshToList() {
                var oArg = new Object();
                oArg.Result = 1;
                ChangeOnClientClose(oArg);
            } 
       
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="rgChangeList" LoadingPanelID="gridLoadingPanel">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="RadAjaxManager2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgPersonList" LoadingPanelID="gridLoadingPanel">
                    </telerik:AjaxUpdatedControl>
                 
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <input id="hdSearchEndStr" type="hidden" runat="server" value="" />
    <input id="hdClassId" type="hidden" runat="server" value="0" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
            <td width="19" class="xx_m">
                <img src="../images/xx_l.jpg" width="19" height="33" />
            </td>
            <td width="24" class="xx_m">
                <img src="../images/xx_icon.jpg" width="24" height="33" />
            </td>
            <td width="1250" class="xx_m">
                人员列表
            </td>
            <td width="14">
                <img src="../images/xx_r.jpg" width="14" height="33" />
            </td>
        </tr>
        <tr id="UserManagerSelect" runat="server">
            <td class="left_con">
                &nbsp;
            </td>
            <td colspan="2" style="padding-left: 6px; padding-right: 6px;" valign="top">
                <!--#订单列表-->
                <div class="xian">
                    <div class="about_title">
                        人员列表</div>
                    <div class="i-con-cn">
                        <%--<a href="javascript:void(0);" class="xtbiao" onclick="return ChangeView();">变 更</a>--%>
                        <%--<asp:LinkButton ID="btnUpdatePerson" runat="server" OnClick="btnUpdatePerson_Click"
                                CssClass="xtbiao" OnClientClick="return ChangeView();">变 更</asp:LinkButton>--%>
                        <asp:LinkButton ID="lbtnEmpSreach" runat="server" CssClass="xtbiao" OnClick="lbtnEmpSreach_Click">查 询</asp:LinkButton>
                    </div>
                </div>
                <div style="padding-bottom: 5px; background-color: #eaeaea; width: 100%; padding-top: 5px;
                    margin-bottom: 10px;">
                    <table>
                        <tr>
                            <td align="center" style="width: 40px;">
                                姓名
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmpName" runat="server" MaxLength="10" Width="100px" CssClass="text_css"></asp:TextBox>
                            </td>
                            <td style="width: 50px;" align="center">
                                身份证
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmpIdCard" runat="server" MaxLength="30" CssClass="text_css"
                                    Width="150px"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <telerik:RadGrid ID="rgPersonList" runat="server" OnNeedDataSource="rgPersonList_NeedDataSource"
                        AutoGenerateColumns="False" AllowPaging="True" AllowCustomPaging="True" AllowSorting="True"
                        ShowStatusBar="True" CellSpacing="0" Culture="zh-CN" GridLines="None">
                        <ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True" EnableRowHoverStyle="true">
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="False" NoMasterRecordsText="暂无数据">
                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                            </ExpandCollapseColumn>
                            <Columns>
                                <%--<telerik:GridTemplateColumn HeaderText="选择" HeaderStyle-Width="50px">
                                    <ItemTemplate>
                                        <input id="ckb" type="checkbox" value='<%#Eval("EmpGuid") %>' runat="server" />
                                    </ItemTemplate>
                                    <HeaderStyle Width="50px"></HeaderStyle>
                                    <ItemStyle Width="50px"></ItemStyle>
                                </telerik:GridTemplateColumn>--%>
                                <telerik:GridBoundColumn DataField="EmpGuid" DataType="System.String" HeaderText="EmpGuid"
                                    UniqueName="EmpGuid" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ID" DataType="System.String" HeaderText="ID"
                                    UniqueName="ID" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Name" DataType="System.String" HeaderText="Name"
                                    UniqueName="Name" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="corpName" DataType="System.String" HeaderText="企业名称"
                                    UniqueName="corpName" SortExpression="corpName">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="姓名" SortExpression="Name">
                                    <ItemTemplate>
                                        <a href="javascript:void(0);" onclick="ShowViewForm('<%#Eval("EmpGuid") %>')" title="点击查看人员信息">
                                            <span style="color: #43a9f5">
                                                <%#Eval("Name") %></span></a>
                                    </ItemTemplate>
                                    <ItemStyle Width="65px"></ItemStyle>
                                </telerik:GridTemplateColumn>
                                <telerik:GridCalculatedColumn SortExpression="IDType" HeaderText="证件类型" DataFields="IDType"
                                    Expression='{0}=="1"?"身份证":"其他"' FooterText="CalculatedColumn footer" HeaderStyle-HorizontalAlign="Center"
                                    Visible="False">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle Width="60px" HorizontalAlign="Center"></ItemStyle>
                                </telerik:GridCalculatedColumn>
                                <telerik:GridBoundColumn DataField="IDCard" DataType="System.String" HeaderText="证件号"
                                    HeaderStyle-HorizontalAlign="Center" SortExpression="IDCard" UniqueName="IDCard">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle Width="100px"></ItemStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridCalculatedColumn SortExpression="Sex" HeaderText="性别" DataFields="Sex"
                                    Expression='{0}==1?"男":"女"' FooterText="CalculatedColumn footer" HeaderStyle-HorizontalAlign="Center">
                                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle Width="45px" HorizontalAlign="Center"></ItemStyle>
                                </telerik:GridCalculatedColumn>
                                <telerik:GridBoundColumn DataField="Tel" DataType="System.String" HeaderText="电话"
                                    SortExpression="Tel">
                                    <ItemStyle Width="80px"></ItemStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="StrTitleDetails" DataType="System.String" HeaderText="资格证书"
                                    SortExpression="StrTitleDetails" FilterControlAltText="Filter details column"
                                    UniqueName="details">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="MobileTel" FilterControlAltText="Filter MobileTel column"
                                    HeaderText="手机" SortExpression="MobileTel" UniqueName="MobileTel">
                                    <ItemStyle Width="80px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="操作">
                                    <ItemTemplate>
                                           <input type="button" class="Changebtn" onclick="ChangePerson('0','<%#Eval("EmpGuid") %>',' <%#Eval("Name") %>','<%#Eval("corpName") %>')"
                                            value="单位调动" />
                                    </ItemTemplate>
                                    <ItemStyle Width="65px"></ItemStyle>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="TypeFlag" DataType="System.String" Visible="false">
                                </telerik:GridBoundColumn>
                             
                            </Columns>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                            <PagerStyle AlwaysVisible="True"></PagerStyle>
                        </MasterTableView>
                        <PagerStyle AlwaysVisible="True" />
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                    <!--[if lte IE 6]> </div> <![endif]-->
                </div>
            </td>
            <td class="right_con">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="left_con">
                &nbsp;
            </td>
            <td colspan="2" style="padding-left: 6px; padding-right: 6px;" valign="top">
                <div runat="server" id="renyuandg">
                    <!--#订单列表-->
                    <div class="xian">
                        <div class="about_title">
                            人员单位调动信息</div>
                        <div class="i-con-cn">
                            <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="xtbiao" OnClick="lbtnSearch_Click">查 询</asp:LinkButton>
                        </div>
                    </div>
                    <div style="padding-bottom: 5px; background-color: #eaeaea; width: 100%; padding-top: 5px;
                        margin-bottom: 10px;">
                        <table>
                            <tr>
                                <td id="corpNameSearch" runat="server">
                                    企业名称
                                    <asp:TextBox ID="txtCorpName" runat="server" MaxLength="10" Width="180px" CssClass="text_css"></asp:TextBox>
                                </td>
                                <td align="center" style="width: 40px;">
                                    姓名
                                </td>
                                <td>
                                    <asp:TextBox ID="txtName" runat="server" MaxLength="10" Width="100px" CssClass="text_css"></asp:TextBox>
                                </td>
                                <td align="center" style="width: 70px;">
                                    审核状态
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlStatus" runat="server" Style="width: 100px;" AutoPostBack="True"
                                        OnSelectedIndexChanged="ddlStatus_OnSelectedIndexChanged" AppendDataBoundItems="true">
                                         <asp:ListItem Text="全部" Value=""></asp:ListItem>
                                      
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div>
                        <telerik:RadGrid ID="rgChangeList" runat="server" OnNeedDataSource="rgChangeList_NeedDataSource"
                            AutoGenerateColumns="False" AllowPaging="True" AllowCustomPaging="True" AllowSorting="True"
                            ShowStatusBar="True" CellSpacing="0" Culture="zh-CN" GridLines="None">
                            <ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True" EnableRowHoverStyle="true">
                            </ClientSettings>
                            <MasterTableView AutoGenerateColumns="False" NoMasterRecordsText="暂无数据">
                                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                                </ExpandCollapseColumn>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="ChangeSetId" DataType="System.String" HeaderText="ChangeSetId"
                                        UniqueName="ChangeSetId" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="IsrtUserName" DataType="System.String" HeaderText="企业名称"
                                        SortExpression="IsrtUserName">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridTemplateColumn HeaderText="姓名">
                                        <ItemTemplate>
                                           <a href="javascript:void(0);" onclick="ChangePerson('<%#Eval("ChangeSetId") %>','<%#Eval("ObjectId") %>','<%# Eval("ObjectName")%>','<%#Eval("IsrtUserName") %>')"
                                                title="点击查看人员信息"><span style="color: #43a9f5">
                                                    <%#Eval("objectName")%></span></a>
                                        </ItemTemplate>
                                        <ItemStyle Width="65px"></ItemStyle>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="操作时间">
                                        <ItemTemplate>
                                            <%# Eval("IsrtDate") != null ? Convert.ToDateTime(Eval("IsrtDate")).ToString("yyyy-MM-dd") : ""%>
                                        </ItemTemplate>
                                        <ItemStyle Width="65px"></ItemStyle>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="审核状态">
                                        <ItemTemplate>
                                            <%# Eval("StrFlowCode")%>
                                        </ItemTemplate>
                                        <ItemStyle Width="65px"></ItemStyle>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn HeaderText="主管审核意见" DataType="System.String" DataField="tbDescription">
                                    </telerik:GridBoundColumn>

                                </Columns>
                                <EditFormSettings>
                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                    </EditColumn>
                                </EditFormSettings>
                                <PagerStyle AlwaysVisible="True"></PagerStyle>
                            </MasterTableView>
                            <PagerStyle AlwaysVisible="True" />
                            <FilterMenu EnableImageSprites="False">
                            </FilterMenu>
                        </telerik:RadGrid>
                        <!--[if lte IE 6]> </div> <![endif]-->
                    </div>
                </div>
            </td>
            <td class="right_con">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="con_m">
                <img src="../images/left_bottom.jpg" width="19" height="24" alt="" />
            </td>
            <td colspan="2" class="con_m">
                &nbsp;
            </td>
            <td>
                <img src="../images/right_bottom.jpg" width="14" height="24" alt="" />
            </td>
        </tr>
    </table>
    <telerik:RadAjaxLoadingPanel runat="server" ID="gridLoadingPanel">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true"
        Skin="WebBlue">
    </telerik:RadWindowManager>
</asp:Content>
